package com.zykj.command.fab;

/**
 * @author zhoulj(周利军) [1217102780@qq.com]
 * @Module ID:   <(模块)类编号，可以引用系统设计中的类编号>
 * @Comments: <吊扇的API>
 * @JDK version used:      <JDK1.8> 52
 * @since 2019/1/2-10:52
 */
public class Diaoshan {
    private int speed;

    public static final int HIGH = 1 ;
    public static final int LOW = 2 ;
    public static final int MEDIUM = 3 ;
    public static final int OFF = 0 ;

    public Diaoshan() {

        this.speed = OFF;
    }

    public void off() {
        System.out.println("吊扇已关闭");
        this.speed = OFF;
    }

    public void high() {
        System.out.println("吊扇 高速运行");
        this.speed = HIGH;
    }
    public void medium() {
        System.out.println("吊扇 低速运行");
        this.speed = MEDIUM;
    }
    public void low() {
        System.out.println("吊扇 中速运行");
        this.speed = LOW;
    }

    public int getSpeed() {
        return speed;
    }
}
